<?php

namespace app\services;

use plugin\admin\app\model\Article;

class ArticleService
{
    public static function detail($identifyKey, $language = 'zh')
    {
        $data = Article::where('identify_key', $identifyKey)->where('language', $language)->first();

        $data['content'] = str_replace('src="', 'src="' . getenv('APP_URL'), $data['content']);

        return $data;
    }
}